﻿using System;

///<summary>
/// sample object
///</summary>
namespace Playground.Scratches
{
    class Vehicle
    {
        public int Passangers; //number of passengers
        public int Fuelcap; //fuel capacity in gallons
        public int Mpg; //fuel consumption in miles per gallon

        /// <summary>
        /// Constructor of the vehicle. Sets the fields.
        /// </summary>
        /// <param name="p">Passangers capacity</param>
        /// <param name="f">Fuel capacity</param>
        /// <param name="m">MPG(miles per gallon)</param>
        public Vehicle(int p, int f, int m)
        {
            Passangers = p;
            Fuelcap = f;
            Mpg = m;
        }

        /// <summary>
        /// Range is to calculate the fuel capacity of a vehicle
        /// </summary>
        public int Range()
        {
            return Fuelcap * Mpg;
        }

        public double FuelNeeded(int miles)
        {
            return (double) miles / Mpg;
        }
    }
}
